package com;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

/**
 * @program: SpringBootDemos
 * @description:
 * @author: Kangsen
 * @create: 2022-07-19 14:31
 **/
@Slf4j
public class TestDemoT1 {

    @Test
    public void tt1(){
        //System.out.println(1<<30);

        /*Map<String,String> m = new HashMap<>();
        m.put("1","a");
        m.put("2","b");
        Map<String,String> map = new HashMap<>(m);
        log.info("dasd");*/
        /*String as = "test";
        log.info("  as.hashCode = >{}", as.hashCode());*/

        User user = new User();
        user.setName("小王");
        user.setAge(20);
        changName(user);
        System.out.println(user);


    }


    public void changName(User user){
        /*System.out.println(user);
        user.setName("小王2");
        System.out.println(user);*/


        user = new User();
        user.setName("八嘎");
    }


    @Test
    public void testArrayListHashMap(){
    }

    public static void main(String[] args) {
        String string = new String();
        System.out.println("--------");
        System.out.println(string.length());
    }

    @Test
    public void sortSet(){
        String string = new String();
        System.out.println("--------");
        System.out.println(string.length());
    }

    @Test
    public void orTest(){
        int MAXIMUM_CAPACITY = 1 << 30;

        int maxValue = Integer.MAX_VALUE;

        System.out.println(MAXIMUM_CAPACITY >= maxValue);

        int a = 5;
        int b = 6;
        if(a > 0){
            System.out.println("aaaa");
        }else if(b > 0){
            System.out.println("bbbb");
        }else{
            System.out.println("cccc");
        }
    }
}
